Package MusicLandscape.util.formatters
Class MyShortTrackFormatter
- java.lang.Object
-
- MusicLandscape.util.formatters.MyTrackFormatter
-
- MusicLandscape.util.formatters.MyShortTrackFormatter
-
public class MyShortTrackFormatter extends MyTrackFormatter
This class represents the concept of short formatting of a track containing only some information.- Version:
- 234
- Author:
- TeM, JS
- Stage:
- ES04
- Introduced in:
- ExerciseSheet04
- Programming problem category:
- abstract class
-
-
Constructor Summary
Constructors Constructor Description MyShortTrackFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(Track t)Creates a short format of a track.
-
-
-
Method Detail
-
format
public java.lang.String format(Track t)
Creates a short format of a track.The short representation of a track is
"title" "performer"
(without quotes)
Both title, and performer are exactly ten characters wide with leading blanks (if any).- Specified by:
formatin classMyTrackFormatter- Parameters:
t- the track to be formatted- Returns:
- the formatted String representing the track
-
-